package com.japstudy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.japstudy.dao.IStarWordDao;
import com.japstudy.entity.StarWord;
import com.japstudy.service.IStarWordService;

@Service
public class StarWordServiceImpl implements IStarWordService{
	
	@Autowired
	private IStarWordDao iStarWordDao;

	@Override
	public int add(StarWord starWord) {
		return iStarWordDao.add(starWord);
	}

	@Override
	public int delete(StarWord starWord) {
		return iStarWordDao.delete(starWord);
	}

	@Override
	public List<StarWord> selectAllByLoginUser(String userId) {
		List<StarWord> starWords = iStarWordDao.selectAllByLoginUser(userId);
		return starWords;
	}

}
